<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>tab--遴选机构</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/weadmin.css">
    <script type="text/javascript" src="/templates/act/process-xl.js"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <style>
        h3 {
            text-align: center;
            font-weight: bold;
        }

        h4 {
            text-align: center;
        }

    </style>
</head>
<body>
<div>
    <h3>审查机构遴选表</h3>
</div>
<form class="layui-form searchForm" id="form" action="" lay-filter="example1">
    <table style="margin: 20px auto" border="1">
        <tbody>
        <tr>
            <td>工程项目名称:</td>
            <td id="prjName" name="prjName" style="width: 200px"></td>
            <td>审查内容:</td>
            <td id="submitExamInfo" name="submitExamInfo"></td>
        </tr>
        <tr>
            <td>抽取人:</td>
            <td id="startOrgName" name="startOrgName"></td>
            <td>抽取时间:</td>
            <td id="createTime" name="createTime"></td>
        </tr>
        <tr>
            <td>选定时间:</td>
            <td id="selectedTime" name="selectedTime">9</td>
            <td>审查机构:</td>
            <td id="checkOrgName" name="checkOrgName"></td>
        </tr>
        <tr>
            <td>审查费用：<br>（合同价格）</td>
            <td id="" name="kcCost+sjCost">9999元</td>
            <td></td>
            <td></td>
        </tr>
        </tbody>
    </table>
</form>
<h4>抽选记录</h4>
<table class="layui-table" lay-filter="example2">
    <colgroup>
        <col>
        <col>
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>批次</th>
        <th>定价</th>
        <th>定价时间</th>
        <th>审查机构</th>
        <th>报价（元）</th>
        <th>报价时间</th>
        <th>是否选定</th>
    </tr>
    </thead>
    <tbody class="tbodyHtml">
    </tbody>
</table>
<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script src="/static/js/main.js"></script>
<script>
    var configureCom = {};
    layui.use(['jquery', 'configureCom', 'configure', 'sessionFun', 'table', 'matchDict', 'table',], function () {
        var $ = layui.jquery;
        var configure = layui.configure;
        var table = layui.table;
        var matchDict = layui.matchDict;
        var configureCom = layui.configureCom;
        window.$ = layui.jquery;
        var sessionFun = layui.sessionFun;//存储session

        var listData = sessionFun.get(configure.SESSION_PROJECT_LIST_DATA);//获取 存储的session
        var decId = listData.decId
        nextAll = {
            decId: decId
        }
        configureCom.getJsName(configure.SUBMIT_EXAM_INFO, '', '#submitExamInfo');//审查内容字典

        configureCom.postDataAjax(configure.PRJ_SELECT_DISPLAY_DECLARE_HTTP, nextAll).then(function (res) {
            console.log(1111, res.prjSelectionEntity)
            var selectInfo = res.prjSelectionEntity;//遴选信息
            var selectList = res.prjSelectionEntity.prjSelectionList;//遴选报价列表
            $.each(selectInfo, function (index, value) {
                $('#' + index).html(value);
            });
            var html = '';
            $(selectList).each(function (index, item) {
                $(item.prjPriceList).each(function(childIndex,childItem){
                    html = '<tr>\n' +
                        '        <td id="">'+item.selectedTimes+'</td>\n' +
                        '        <td id="kcCost">勘察费用：'+childItem.kcCost+'元/'+childItem.kcDay+'天<br>施工图审查费用：'+childItem.sjCost+'元/'+childItem.sjDay+'天</td>\n' +
                        '        <td id="">2019-4-4 12:00:00</td>\n' +
                        '        <td id="">'+childItem.orgName+'</td>\n' +
                        '        <td id="">勘察费用：'+childItem.kcCost+'元 <br> 施工图审查费用：'+childItem.sjCost+'元</td>\n' +
                        '        <td id="selectedTime">2019-4-4 12:00:00</td>\n' +
                        '        <td id="">\n' +
                        '            <button class="layui-btn layui-btn-xs" id="">'+matchDict.name(childItem.selectStatus,'PRICE_STATUS2')+'</button>\n' +
                        '        </td>\n' +
                        '    </tr>';

                    $('.tbodyHtml').append(html)
                })

            });
        });
    });
</script>
</body>
</html>